<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>外部函数接口</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.user-error.html">« user_error</a></li>
      <li style="float: right;"><a href="intro.ffi.html">简介 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="refs.basic.php.html">影响 PHP 行为的扩展</a></li>
    <li>外部函数接口</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="book.ffi" class="book">
 
 <h1 class="title">外部函数接口</h1>
 

 

 






 






 






 




 




 




 




 




<ul class="chunklist chunklist_book"><li><a href="intro.ffi.html">简介</a></li><li><a href="ffi.setup.html">安装/配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="ffi.requirements.html">需求</a></li><li><a href="ffi.installation.html">安装</a></li><li><a href="ffi.configuration.html">运行时配置</a></li><li><a href="ffi.resources.html">资源类型</a></li></ul></li><li><a href="ffi.constants.html">预定义常量</a></li><li><a href="ffi.examples.html">范例</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="ffi.examples-basic.html">Basic FFI usage</a></li><li><a href="ffi.examples-callback.html">PHP Callbacks</a></li><li><a href="ffi.examples-complete.html">A Complete PHP/FFI/preloading Example</a></li></ul></li><li><a href="class.ffi.html">FFI</a> — Main interface to C code and data<ul class="chunklist chunklist_book chunklist_children"><li><a href="ffi.addr.html">FFI::addr</a> — Creates an unmanaged pointer to C data</li><li><a href="ffi.alignof.html">FFI::alignof</a> — Gets the alignment</li><li><a href="ffi.arraytype.html">FFI::arrayType</a> — Dynamically constructs a new C array type</li><li><a href="ffi.cast.html">FFI::cast</a> — Performs a C type cast</li><li><a href="ffi.cdef.html">FFI::cdef</a> — Creates a new FFI object</li><li><a href="ffi.free.html">FFI::free</a> — Releases an unmanaged data structure</li><li><a href="ffi.isnull.html">FFI::isNull</a> — Checks whether a FFI\CData is a null pointer</li><li><a href="ffi.load.html">FFI::load</a> — Loads C declarations from a C header file</li><li><a href="ffi.memcmp.html">FFI::memcmp</a> — Compares memory areas</li><li><a href="ffi.memcpy.html">FFI::memcpy</a> — Copies one memory area to another</li><li><a href="ffi.memset.html">FFI::memset</a> — Fills a memory area</li><li><a href="ffi.new.html">FFI::new</a> — Creates a C data structure</li><li><a href="ffi.scope.html">FFI::scope</a> — Instantiates an FFI object with C declarations parsed during preloading</li><li><a href="ffi.sizeof.html">FFI::sizeof</a> — Gets the size of C data or types</li><li><a href="ffi.string.html">FFI::string</a> — Creates a PHP string from a memory area</li><li><a href="ffi.type.html">FFI::type</a> — Creates an FFI\CType object from a C declaration</li><li><a href="ffi.typeof.html">FFI::typeof</a> — Gets the FFI\CType of FFI\CData</li></ul></li><li><a href="class.ffi-cdata.html">FFI\CData</a> — C Data Handles</li><li><a href="class.ffi-ctype.html">FFI\CType</a> — C Type Handles<ul class="chunklist chunklist_book chunklist_children"><li><a href="ffi-ctype.getalignment.html">FFI\CType::getAlignment</a> — Description</li><li><a href="ffi-ctype.getarrayelementtype.html">FFI\CType::getArrayElementType</a> — Description</li><li><a href="ffi-ctype.getarraylength.html">FFI\CType::getArrayLength</a> — Description</li><li><a href="ffi-ctype.getattributes.html">FFI\CType::getAttributes</a> — Description</li><li><a href="ffi-ctype.getenumkind.html">FFI\CType::getEnumKind</a> — Description</li><li><a href="ffi-ctype.getfuncabi.html">FFI\CType::getFuncABI</a> — Description</li><li><a href="ffi-ctype.getfuncparametercount.html">FFI\CType::getFuncParameterCount</a> — Description</li><li><a href="ffi-ctype.getfuncparametertype.html">FFI\CType::getFuncParameterType</a> — Description</li><li><a href="ffi-ctype.getfuncreturntype.html">FFI\CType::getFuncReturnType</a> — Description</li><li><a href="ffi-ctype.getkind.html">FFI\CType::getKind</a> — Description</li><li><a href="ffi-ctype.getname.html">FFI\CType::getName</a> — Description</li><li><a href="ffi-ctype.getpointertype.html">FFI\CType::getPointerType</a> — Description</li><li><a href="ffi-ctype.getsize.html">FFI\CType::getSize</a> — Description</li><li><a href="ffi-ctype.getstructfieldnames.html">FFI\CType::getStructFieldNames</a> — Description</li><li><a href="ffi-ctype.getstructfieldoffset.html">FFI\CType::getStructFieldOffset</a> — Description</li><li><a href="ffi-ctype.getstructfieldtype.html">FFI\CType::getStructFieldType</a> — Description</li></ul></li><li><a href="class.ffi-exception.html">FFI\Exception</a> — FFI Exceptions</li><li><a href="class.ffi-parserexception.html">FFI\ParserException</a> — FFI Parser Exceptions</li></ul></div></div></div></body></html>